Skip to content

Misc client bug fixes#386

Merged
annehaley merged 12 commits into
masterfrom
client-bug-fixes
May 15, 2026
Merged

Misc client bug fixes#386
annehaley merged 12 commits into
masterfrom
client-bug-fixes

Conversation

@annehaley
Copy link
Copy Markdown
Collaborator

This PR addresses various client bugs (some of which were caught by Sentry in production, some of which I found during the process).

Fixed Bugs

  • Sentry caught this error when a request was unsuccessful: "Cannot read properties of undefined (reading 'results')". This can be solved with the "?" optional chaining operator wherever we access .data.results in rest.ts
  • The previews in the basemap options menu were broken due to the format of the bounds value. I don't know what changed to break this since I implemented it, but converting the format of the bounds fixed it.
  • The screenshot feature was broken, raising the following error: "Unsupported color format color()". I swapped out html2canvas for html2canvas-pro, which is a fork of the original with advanced color support. Again, I don't know what changed since I implemented screenshots, but the dependency swap fixes it.
  • In the basemap creation dialog on the "MapLibre Style JSON" tab, the instructions state that you can paste JSON or you can specify a URL. However, the validation was broken if you pasted a URL; it tried to validate that string instead of the content at the url. I added a fetch statement wrapped in a try-except to handle this.

Other Improvements

  • I fixed a few styling things that I noticed: some icons lacked colors and the spacing was too compact around the project config section of the left sidebar
  • The menu to toggle the visibility of panels was a bit frustrating; you could click the name of a panel and it would animate like the click did something, but the toggle would only apply if you clicked directly on the checkbox. I fixed this so that clicking anywhere on the list item would apply the toggle.

@annehaley annehaley requested a review from BryonLewis May 13, 2026 19:31
Copy link
Copy Markdown
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main thing is that the sentry error, I think removing the attempt to access the endpoint before logging in would be the proper fix instead of the optional chaining on the request results.

The other comment is more a question and can be ignored mostly because it's a niche feature I don't think mainly people would be using too often.

Comment thread web/src/api/rest.ts Outdated
Comment thread web/src/components/ControlsBar.vue
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 15, 2026

Deploying geodatalytics with  Cloudflare Pages  Cloudflare Pages

Latest commit: ce506f1
Status: ✅  Deploy successful!
Preview URL: https://b5180a41.geodatalytics.pages.dev
Branch Preview URL: https://client-bug-fixes.geodatalytics.pages.dev

View logs

@BryonLewis BryonLewis self-requested a review May 15, 2026 16:49
Copy link
Copy Markdown
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works now, if you really want a background map before logging in, you can add it here before merging

@annehaley
Copy link
Copy Markdown
Collaborator Author

Thanks, I added a default map (with a dark and a light mode) that shows when not authenticated.

@annehaley annehaley requested a review from BryonLewis May 15, 2026 17:08
Copy link
Copy Markdown
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@annehaley annehaley merged commit 189b391 into master May 15, 2026
4 checks passed
@annehaley annehaley deleted the client-bug-fixes branch May 15, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants